package com.senven.api.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.senven.api.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author LQP
 */
@Component
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 增删改查
     * @return
     */
    /* 分页了，弃用
    public List<Department> queryDepartmentList();
    public List<Department> queryDepartmentListByName(String name);
    */

    public Department queryDepartmentListById(int did,int oid);
    public int deleteDepartment(int oid,int did);
    public int insertDepartment(Department department);
    public int updateDepartment(Department department);


    //不会用这个
    //public IPage<Department> selectPageVo(Page page, @Param("state") Integer state);
}
